package com.yidiandao.business.data.model;

import com.yidiandao.business.data.recyclertype.Article;
import com.yidiandao.business.data.recyclertype.SearchAccurateContent;
import com.yidiandao.business.data.recyclertype.SearchHistory;

import java.util.List;

/**
 * IDiscoverySearchModel
 * <p>
 * Created by ChenTao(chentao7v@gmail.com) on 2017/4/13 0013 14:30
 */
public interface IDiscoverySearchModel {

    interface OnLoadResultListener<T> {

        void onSuccess(T t, boolean emptyData, boolean hasMore);

        void onFailed();
    }

    SearchHistory loadSearchHistory();

    void loadAccurateContent(String pagerTag, OnLoadResultListener<SearchAccurateContent> listener);

    void saveSearchHistory(String keyword);

    /**
     * 发现-一级 -模糊搜索
     */
    void commonSearch(String tag, String keyword, OnLoadResultListener<List<Object>> resultList);

    /**
     * 精确搜索
     */
    void searchAccurate(String tag, boolean isRefreshing, String extraId, String keyword, OnLoadResultListener<List<Article>> listener);

    void clearHistory();

}
